#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <myptz.h>
#include <QtGui>

#include <stdio.h>
#include <iostream>

#include <proclib_SourceManager.h>
#include <proclib_axis_controller.h>
#include <opencvsupport.h>

#include <imglib_VideoOutput_JPGSequence.h>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
     void capturePosition();
     void captureMoved();
    ~MainWindow();
    
private:
    Ui::MainWindow *ui;

    QPushButton *cmdIniziaPTZ;
    QPushButton *cmdGoPTZ;
    QPushButton *cmdGoHome;
    QPushButton *cmdSpirale;
    QPushButton *cmdStopSpirale;
    QPushButton *cmdStampa;
    QPushButton *cmdSaveFrame;
    QMdiArea *mdiArea;
    QPushButton *cmdGoABS;

    QTextBrowser *Output;
    CSourceManager *camVideo;

    CVideoOutput_JPG *_registratore;

    bool _setDetector;
    bool _registra;

    myPTZ *PTZ;


    QThread cThread;
    int x,y,z;

    float Pan, Tilt;

    int Zoom;

    QLineEdit *X;
    QLineEdit *Y;
    QLineEdit *Z;


public slots:
    void sl_drawDetercorView(CImageRGB* frame);
    void sl_onDetecor();
    void sl_movePoint();
    void sl_moveSpirale();
    void sl_stamp();
    void sl_moveHome();
    void sl_SaveFrame();
    void sl_movePointABS();

};

#endif // MAINWINDOW_H
